package com.rs.statistics.dao;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.rs.statistics.model.Users;
@Transactional
public interface ILoginDao extends JpaRepository<Users, Integer>{
	
	Users findByNameAndPassword(String name, int password);
	 @Modifying
	 @Query("update Users u set u.password=:password,u.pwd=:password where u.id =:id and u.pwd=:pwd")
	int updatepwd(int id, int password, int pwd);


}


